#pragma once
#include "Matrix33.h"
#include "Quaternion.h"
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

class Quaternion;//forward include to avoid circular inclusion errors

struct coord //A struct to load in a 2D coordinate
{
	GLfloat x, y, z;
	coord(){}
	coord(float _x, float _y, float _z)
	{
		x = (GLfloat)_x;
		y = (GLfloat)_y;
		z = (GLfloat)_z;
	}
};

class Vector //Our Vector Class
{
public:
	Vector();
	Vector (coord start, coord end);
	Vector (float x, float y, float z);
	~Vector(void);

	void addVector(Vector *otherVector); //Adds a vector onto current vector
	void addVector(Vector otherVector); 

	void subtractVector(Vector *otherVector); //Subtracts a vector from current vector
	void subtractVector(Vector otherVector);

	void multiplyVector(float scalar); //Multiplies current vector by a scalar value
	void multiplyVector(Matrix33 *otherMatrix); //Multiplies current vector by a matrix
	void multiplyVector(Matrix33 otherMatrix);
	void multiplyVector(Quaternion *rotationQuat); //Multiplies current vector by a quaternion
	void multiplyVector(Quaternion rotationQuat);

	void translate(Vector *translationVector);

	float dotProduct(Vector *otherVector);//length of projection of one vector on a another
	Vector projectionVector(Vector *otherVector);//projection of one vector on other vector

	void normalize(); //normalize's current vector
	void reset(); //reset's current vector to initial given position 
	float returnLength(); //return's length of vector

	void updateVector(Matrix33 * rotationMatrix, Vector * translationVector); //updates vector given a rotation matrix and translation vector

	//Public Data variables for us to use
	coord thisVector;
	coord startVector;
	coord endVector;
	float length;
	//this will be used to pass some things into openGL mostly
	GLfloat X_Y_Z[3];

	Vector operator+(Vector other);
	Vector operator-(Vector other);
	Vector operator*(Matrix33 other);
	Vector operator*(Quaternion other);
	Vector operator*(float scalar);
private:
	coord initialStart, initialEnd; //coordinates to store our initial given vector for resetting
};